Skip to main content
Version: 3.0

Common Data Masker Properties

There is a common set of properties and corresponding functionality that is shared across all Obfusware data maskers. Data masker properties are set using JSON. Properties can be supplied in either a JSON string or via a JSON configuration file.

Properties

  • name { string; required }
    The name of the Obfusware data masker. Must be unique. Names should be a single word. Use camel case to combine words for easy comprehension. By convention, data masker names end with suffix Masker.
    Example: "name": "LoremIpsumMasker"

  • description { string; optional; default: "" }
    A short description of the functionality of the data masker. Should clearly describe the masked data result and not how the result is achieved. Differentiate this masker from other masters using the same algorithm
    Example: "description": "Replaces the characters of the string being masked with the '*' character"

  • trimWhiteSpace { boolean; optional; default: false }
    If true, trims all whitespace from the beginning and end of the original string.
    Example: "trimWhiteSpace": true

  • outputCase { enum; optional; default: AsIs }
    The case of the masked string. One of AsIs, Lower, Upper, Title, or Input. The Input value attempts to determine the case of the original input String and match it.
    Example: "outputCase": "Title"

  • isEmptyDefault { boolean; optional; default: false }
    If true and the string data value being masked is empty then replace with the defaultString value.
    Example: "isEmptyDefault": true

  • defaultString { string; optional; default: null }
    If the defaultString is non-null and if a string value being masked is null or isEmptyDefault is true, then replace with the defaultString value.
    Example: "defaultString": "N/A"

  • defaultNumber { number; optional; default: null }
    The defaultNUmber is non-null and if a number value being masked is null, then replace with the defaultNumber value. Example: "defaultNumber": -1

  • defaultNumberType { enum; optional; default: Decimal }
    The type of the defaultNumber. One of Int, Long, Float, Double, Integer, or Decimal. Obfusware represents these types using the Java types Integer, Long, Float, Double, BigInteger and BigDecimal.
    Example: "defaultNumberType": "Int"

  • algorithm { string; required }
    The name of the algorithm used to implement the data masking for this data masker. Must be one of the Obfusware implemented algorithms
    Example: "algorithm": "HashList"

Example Obfusware Data Masker JSON Configuration

{
"name": "ExampleStringMasker",
"description": "Replaces null or empty string with 'N/A', trims white space, and changes strings to Title case",
"trimWhiteSpace": true,
"outputCase": "Title",
"isEmptyDefault": true,
"defaultString": "N/A",
"algorithm": "Identity"
}